//封装结算页相关接口
//多为order
import httpInstance from "@/utils/http";

// 
// export const getCheckoutInfoAPI = () => {
//     return httpInstance({
//         url: '???',
//     })
// }
export const createOrderAPI = (data) => {
  return httpInstance({
    url: '/order/create',
    method: 'POST',
    data
  })
}

//用于结算页面的订单数据
export function getOrderAPI(id) {
  return httpInstance({
    url: '/order/getOrder',
    params: {
      id
    }
  })
}

export const payOrderAPI = (data) => {
  return httpInstance({
    url: '/order/pay',
    method: 'POST',
    data
  })
}
export const confirmReceiptAPI = (id) => {
  return httpInstance({
    url: '/order/confirmReceipt',
    params:{
      id
    }
  })
}


export const getUserOrderAPI = (params) => {
  return httpInstance({
    url: '/order/getOrderByStatus',
    params
  })
}

